package br.com.sistema.entidade;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

import br.com.framework.client.permissao.entidade.EntityGeneric;

@Entity
@Table(name = "CLIENTE")
public class Cliente implements EntityGeneric, Serializable {

	private static final long serialVersionUID = 4506261549261101397L;

	@Id
	@Column(name = "ID")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CLIENTE_SEQ_ID")
	@SequenceGenerator(name = "CLIENTE_SEQ_ID", sequenceName = "CLIENTE_SEQ_ID", allocationSize = 1)
	private Integer id;

	@Column(name = "NOME")
	private String nome;

	@Transient
	private boolean selected;

	public Cliente() {

	}

	public Cliente(Cliente cliente) {
		setId(cliente.getId());
		setNome(cliente.getNome());
		setSelected(cliente.isSelected());
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}

}